package com.yiren.manager.ctrl.view;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yiren.core.exception.MyException;
import com.yiren.core.repository.utils.QueryResult;
import com.yiren.core.utils.HTTPResult;
import com.yiren.entity.ViewMealsCostRecordMonth;
import com.yiren.manager.service.iface.view.ViewMealsCostRecordMonthService;

/*
 * 提现申请的查询控制类
 */
@RequestMapping("viewMealsCostRecordMonth")
@Controller
public class ViewMealsCostRecordMonthController {
	
	@Autowired
	private ViewMealsCostRecordMonthService selfService;
	
	@RequestMapping("findAll")
	@ResponseBody
	public HTTPResult<ViewMealsCostRecordMonth> findAll() throws MyException{
		HTTPResult<ViewMealsCostRecordMonth> result = new HTTPResult<ViewMealsCostRecordMonth>();
		
		QueryResult<ViewMealsCostRecordMonth> qr = selfService.find(ViewMealsCostRecordMonth.class, null, new Object[]{});
		
		result.setData(qr.getResultList());
		
		return result;
	}
}
